]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-global: Add wrappers for TelepathyLogger
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 26 Feb 2011 17:32:27 +0000 (12:32 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 14 Mar 2011 22:49:31 +0000 (18:49 -0400)
gjs can't support more than one callback in the same function,
so work around this with yet another shell-global wrapper.

https://bugzilla.gnome.org/show_bug.cgi?id=643377

src/Makefile.am
src/shell-global.c
src/shell-global.h

index 7c251de0aba3bc01239662172084e9b12d1a7758..a018e81bddc1233f66eac5bf64330ca7fb5f21d8 100644 (file)
@@ -262,7 +262,7 @@ libgnome_shell_la_LIBADD =          \
 libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
 
 Shell-0.1.gir: libgnome-shell.la St-1.0.gir
-Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-2.91 TelepathyGLib-0.12
+Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-2.91 TelepathyGLib-0.12 TelepathyLogger-1.0
 Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
 Shell_0_1_gir_LIBS = libgnome-shell.la
 Shell_0_1_gir_FILES = $(addprefix $(srcdir)/,$(libgnome_shell_la_gir_sources))
index 67c870325698b6b8f8d1e7e9288025c31704a493..88b8224b778bc847b4459d6dec41bdd295285a04 100644 (file)
@@ -2088,3 +2088,30 @@ shell_get_self_contact_features (TpConnection *self,
                                   shell_global_get_self_contact_features_cb,
                                   callback, NULL, NULL);
 }
+
+/**
+ * shell_get_contact_events:
+ * @log_manager: A #TplLogManager
+ * @account: A #TpAccount
+ * @entity: A #TplEntity
+ * @num_events: The number of events to retrieve
+ * @callback: (scope async): User callback to run when the contact is ready
+ * 
+ * Wrap tpl_log_manager_get_filtered_events_async because gjs cannot support
+ * multiple callbacks in the same function call.
+ */
+void
+shell_get_contact_events (TplLogManager *log_manager,
+                          TpAccount *account,
+                          TplEntity *entity,
+                          guint num_events,
+                          GAsyncReadyCallback callback)
+{
+  tpl_log_manager_get_filtered_events_async (log_manager,
+                                             account,
+                                             entity,
+                                             TPL_EVENT_MASK_TEXT,
+                                             num_events,
+                                             NULL, NULL,
+                                             callback, NULL);
+}
index b3f86e398570f54a818f6143530a3af3c9ff3fab..1ca247c50fd10b9f99e043eb0f999b04de57246e 100644 (file)
@@ -8,6 +8,7 @@
 #include <gtk/gtk.h>
 #include <meta/meta-plugin.h>
 #include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-logger/telepathy-logger.h>
 
 G_BEGIN_DECLS
 
@@ -165,6 +166,12 @@ void shell_get_self_contact_features (TpConnection *self,
                                       const TpContactFeature *features,
                                       ShellGetSelfContactFeaturesCb callback);
 
+void shell_get_contact_events (TplLogManager *log_manager,
+                               TpAccount *account,
+                               TplEntity *entity,
+                               guint num_events,
+                               GAsyncReadyCallback callback);
+
 G_END_DECLS
 
 #endif /* __SHELL_GLOBAL_H__ */